// source --> https://prosoccer5.fr/wp-content/themes/Untitled/layout.core.js // IE10+ flex fix if (1-'\0') { var fixHeight = function fixHeight() { jQuery('.bd-row-flex > [class*="col-"] > [class*="bd-layoutcolumn-"] > .bd-vertical-align-wrapper, ' + '[class*="bd-layoutitemsbox-"].bd-flex-wide').each(function () { var content = jQuery(this); var wrapper = content.children('.bd-fix-flex-height'); if (!wrapper.length) { content.wrapInner('
'); } var height = wrapper.outerHeight(true); content.removeAttr('style'); content.css({ '-ms-flex-preferred-size': height + 'px', 'flex-basis': height + 'px' }); }); setTimeout(fixHeight, 500); }; var fixMinHeight = function () { jQuery('.bd-stretch-inner').wrap('
'); }; jQuery(fixHeight); jQuery(fixMinHeight); }; // source --> https://prosoccer5.fr/wp-content/themes/Untitled/CloudZoom.js?ver=1.0.1294 ////////////////////////////////////////////////////////////////////////////////// // Cloud Zoom V1.0.3 // Rev 201209181857 // (c) 2010-2012 by R Cecco. // MIT License // // Please retain this copyright header in all versions of the software // ////////////////////////////////////////////////////////////////////////////////// (function (jQuery, $) { 'use strict'; var scripts = document.getElementsByTagName("script"), index = scripts[scripts.length - 1].src.lastIndexOf('/'), lastScriptPath = scripts[scripts.length - 1].src.slice(0, index); $(document).ready(function () { $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom(); }); function format(str) { for (var i = 1; i < arguments.length; i++) { str = str.replace('%' + (i - 1), arguments[i]); } return str; } function CloudZoom(jWin, opts) { var sImg = $('img', jWin); var img1; var img2; var zoomDiv = null; var $mouseTrap = null; var lens = null; var $tint = null; var softFocus = null; var $ie6Fix = null; var zoomImage; var controlTimer = 0; var cw, ch; var destU = 0; var destV = 0; var currV = 0; var currU = 0; var filesLoaded = 0; var mx, my; var ctx = this, zw; setTimeout(function () { if ($mouseTrap === null) { var w = jWin.width(); jWin.parent().append(format('
Loading...
', w / 3, (w / 2) - (w / 6))); $('cloud-zoom-loading', jWin.parent()).css('opacity', 0.5); } }, 200); var ie6FixRemove = function () { if ($ie6Fix !== null) { $ie6Fix.remove(); $ie6Fix = null; } }; this.removeBits = function () { if (lens) { lens.remove(); lens = null; } if ($tint) { $tint.remove(); $tint = null; } if (softFocus) { softFocus.remove(); softFocus = null; } ie6FixRemove(); $('.cloud-zoom-loading', jWin.parent()).remove(); }; this.destroy = function () { jWin.data('zoom', null); if ($mouseTrap) { $mouseTrap.unbind(); $mouseTrap.remove(); $mouseTrap = null; } if (zoomDiv) { zoomDiv.remove(); zoomDiv = null; } this.removeBits(); }; this.fadedOut = function () { if (zoomDiv) { zoomDiv.remove(); zoomDiv = null; } this.removeBits(); }; this.controlLoop = function () { if (lens) { var x = (mx - sImg.offset().left - (cw * 0.5)) >> 0; var y = (my - sImg.offset().top - (ch * 0.5)) >> 0; if (x < 0) { x = 0; } else if (x > (sImg.outerWidth() - cw)) { x = (sImg.outerWidth() - cw); } if (y < 0) { y = 0; } else if (y > (sImg.outerHeight() - ch)) { y = (sImg.outerHeight() - ch); } lens.css({ left: x, top: y }); lens.css('background-position', (-x) + 'px ' + (-y) + 'px'); destU = (((x) / sImg.outerWidth()) * zoomImage.width) >> 0; destV = (((y) / sImg.outerHeight()) * zoomImage.height) >> 0; currU += (destU - currU) / opts.smoothMove; currV += (destV - currV) / opts.smoothMove; zoomDiv.css('background-position', (-(currU >> 0) + 'px ') + (-(currV >> 0) + 'px')); } controlTimer = setTimeout(function () { ctx.controlLoop(); }, 30); }; this.init2 = function (img, id) { filesLoaded++; if (id === 1) { zoomImage = img; } if (filesLoaded === 2) { this.init(); } }; this.init = function () { $('.cloud-zoom-loading', jWin.parent()).remove(); var $m = $("
"); $mouseTrap = jWin.parent().append($m).find(':last'); $mouseTrap = $('.mousetrap', jWin.parent()); $mouseTrap.css({ width: sImg.outerWidth(), height: sImg.outerHeight(), top: 0, left: 0, position: 'absolute', zIndex: 9999 }); $mouseTrap.bind('mousemove', this, function (event) { mx = event.pageX; my = event.pageY; }); $mouseTrap.bind('mouseleave', this, function () { cw = (sImg.outerWidth() / zoomImage.width) * opts.zoomWidth; ch = (sImg.outerHeight() / zoomImage.height) * opts.zoomHeight; if ((parseFloat($('body').css('width').replace('px', '')) < 980) || (cw === sImg.outerWidth() && ch === sImg.outerWidth())) return; clearTimeout(controlTimer); if (lens) { lens.fadeOut(299); } if ($tint) { $tint.fadeOut(299); } if (softFocus) { softFocus.fadeOut(299); } zoomDiv.fadeOut(300, function () { ctx.fadedOut(); }); return false; }); $mouseTrap.bind('mouseenter', this, function (event) { mx = event.pageX; my = event.pageY; zw = event.data; if (zoomDiv) { zoomDiv.stop(true, false); zoomDiv.remove(); } var xPos = opts.adjustX, yPos = opts.adjustY; var siw = sImg.outerWidth(); var sih = sImg.outerHeight(); var w = opts.zoomWidth; var h = opts.zoomHeight; if (opts.zoomWidth === 'auto') { w = siw; } if (opts.zoomHeight === 'auto') { h = sih; } var appendTo = jWin.parent(); switch (opts.position) { case 'top': yPos -= h; break; case 'right': xPos += siw; break; case 'bottom': yPos += sih; break; case 'left': xPos -= w; break; case 'inside': w = siw; h = sih; break; default: appendTo = $('#' + opts.position); if (!appendTo.length) { appendTo = jWin; xPos += siw; yPos += sih; } else { w = appendTo.innerWidth(); h = appendTo.innerHeight(); } } zoomDiv = appendTo.append(format('', xPos+4, yPos-4, w, h, zoomImage.src)).find(':last'); zoomDiv = $('.cloud-zoom-big', appendTo); cw = zoomImage.width > sImg.outerWidth() ? sImg.outerWidth() / zoomImage.width * zoomDiv.width() : sImg.outerWidth(); ch = zoomImage.height > sImg.outerHeight() ? sImg.outerHeight() / zoomImage.height * zoomDiv.height() : sImg.outerHeight(); if ((parseFloat($('body').css('width').replace('px', '')) < 980) || (cw === sImg.outerWidth() && ch === sImg.outerHeight())) return; if (sImg.attr('title') && opts.showTitle) { zoomDiv.append(format('
%0
', sImg.attr('title'))); $('.cloud-zoom-title', zoomDiv).css('opacity', opts.titleOpacity); } if ($.browser && $.browser.msie && $.browser.version < 7) { $ie6Fix = $('').css({ position: "absolute", left: xPos, top: yPos, zIndex: 99, width: w, height: h }).insertBefore(zoomDiv); } zoomDiv.fadeIn(500); // fix zoom-big position var bodyWidth = $('body').width(); var zOffset = zoomDiv.offset(); var sImgOffset = sImg.offset(); if (zOffset && zOffset.left) { var leftSpace = sImgOffset.left, rightSpace = bodyWidth - zOffset.left; if (rightSpace < leftSpace) { var zLeft = zoomDiv.css('left'); zoomDiv.css({'left': 'auto', 'right': zLeft}); } else if (zOffset.left < 0) { zoomDiv.css({'right': 'auto', 'left': zoomDiv.outerWidth()}); } } if (lens) { lens.remove(); lens = null; } lens = jWin.append(format("", cw, ch)).find(':last'); lens = $('.cloud-zoom-lens', jWin); $mouseTrap.css('cursor', lens.css('cursor')); var noTrans = false; if (opts.tint) { //lens.css('background', 'url("' + sImg.attr('src') + '")'); не показываем фон для линзы из-за проблем при ресайзу //lens.css('background-size', sImg.outerWidth() + 'px auto'); $tint = jWin.append(format('